﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace lucere.io
{
	/// <summary>
	/// Expert: A Directory instance that switches files between
	/// two other Directory instances.
	/// <p>Files with the specified extensions are placed in the
	/// primary directory; others are placed in the secondary
	/// directory.  The provided Set must not change once passed
	/// to this class, and must allow multiple threads to call
	/// contains at once.</p>
	/// <p><b>NOTE</b>: this API is new and experimental and is
	/// subject to suddenly change in the next release.
	/// </summary>
	public interface IFileSwitchDirectory : IDirectory
	{
		IDirectory Primary { get; }
		IDirectory Secondary { get; }

		/// <summary>
		/// Utility method to return a file's extension.
		/// </summary>
		/// <param name="name"></param>
		/// <returns></returns>
		string GetExtension(string name);

		IDirectory GetDirectory(string name);
	}
}
